﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VirtualTournaments.Services.Tournaments
{
    public class Fixture : IEnumerable<Journey>
    {
        private List<Journey> _journeys;

        public Fixture()
        {
            Journeys = new List<Journey>();
        }

        public Journey GetJourney(int JourneyNumber)
        {
            return Journeys[JourneyNumber - 1];
        }

        public int JourneysCount()
        {
            return Journeys.Count;
        }

        public virtual List<Journey> Journeys
        {
            get { return _journeys; }
            set { _journeys = value; }
        }

        public IEnumerator<Journey> GetEnumerator()
        {
            return Journeys.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return Journeys.GetEnumerator();
        }
    }

    

}
